﻿<%@ Page Language="C#"MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="SysRolePrivilegeManage.aspx.cs" Inherits="StoragePeriod.Web.SysManage.SysRolePrivilegeManage" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
    .layout{ background:url(../images/images_59.jpg) no-repeat;}
    .left-cloumn{display:none;}
    .right-cloumn{width:944px;}
    #sms_title_li_0{ background:url(../images/images_55.jpg) no-repeat;}
    .Left_Search{width:190px;padding-left:10px; height:30px;border-top:1px solid #ccc;}
</style>
<script type="text/javascript">

    $(document).ready(function () {
        $("#MainContent_PersonnelTree input[type='checkbox']").click(function () {
            if ($(this).attr("checked")) {
                $(this).parents("table").nextAll("div:first").find("input[type='checkbox']").attr("checked", true);
            }
            else {
                $(this).parents("table").nextAll("div:first").find("input[type='checkbox']").attr("checked", false);
            }
        });


        $("#add-priv").click(function () {
            var src = '../UserControls/Picker.aspx?rolecode={0}&type={1}';
            var rolecode = $("[id$=hdRoleCode]").val();

            $("#idialogView").attr('src', src.format(rolecode, 'privilege'));
            
            return false;
        });

        sp.page.backvalue = $("[id$=hdRoleCode]").val();
    });
    sp.page.reload = function () {
        if (sp.page.backvalue != '-1') {
            location.href = location.href.split('?')[0] + "?backvalue=" + sp.page.backvalue;
        }
    }
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainLeft" runat="server">
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">


<div class="sms_title">
    <ul>
        <li><a href="../SysManage/AddPrivliege.aspx">添加权限码</a></li>
        <li><a href="../SysManage/AddRole.aspx">添加角色</a></li>
        <li><a href="../SysManage/SysRolePrivilegeManage.aspx" style="color: #f90;">角色权限管理</a></li>
        <li><a href="../SysManage/PersonnelRoleManage.aspx">人员角色分配</a></li>
        <li><a href="../SysManage/RawTypeManage.aspx">原料分类指派</a></li>
        <li><a href="#">计算公式维护</a></li>
    </ul>
</div>
<div class="sms_main">
    <div class="sms_left" style="float:right;margin-right:10px;">
        <div style="width:700px; height:35px; line-height:35px;">
            <table width="100%">
                <tr>
                    <td align="left">角色名称: 
                        <asp:Literal Text="" runat="server" ID="lbSelected" /> </td>
                    <td align="right"><button class="ui-button" id="add-priv">添加权限模块</button></td>
                </tr>
            </table>
        </div>
        <div style="width:700px; height:405px; border:1px solid #c1dfec; background-color:#fff; overflow-x:hidden; overflow-y:auto;">
            <asp:GridView ID="gvRoleprivilegeView" runat="server" CssClass="sp-common-table ui-widget ui-widget-content"
                AllowPaging="True" DataKeyNames="" 
                 onrowdeleting="gvprivilegeView_RowDeleting" 
                 onpageindexchanging="gvRoleprivilegeView_PageIndexChanging">
                <Columns>
                    <asp:CommandField ShowDeleteButton="True" />
                </Columns>
                <HeaderStyle CssClass="ui-widget-header" />
            </asp:GridView>
        </div>
    </div>
    <div class="sms_right" style="float:left;margin-right:0px;margin-left:10px;">
        <h2>角色列表</h2>
        <div class="right_Stafflist">
             <asp:TreeView ID="tvRoleView" runat="server" 
            onselectednodechanged="tvRoleView_SelectedNodeChanged">
                <SelectedNodeStyle Font-Bold="True" />
            </asp:TreeView>
        </div>
        <div class="Left_Search">
            <ul>
                <li><asp:TextBox ID="txt_search" runat="server" CssClass="input_txtSearch" style="width:120px;"></asp:TextBox></li>
                <li><asp:Button ID="Btn_Search" runat="server" CssClass="btn_search" /></li>
                <li><asp:Button ID="Btn_Select" runat="server" Text="确定" CssClass="btn_2" /></li>
            </ul>
            <div class="clearboth"></div>
        </div>
    </div>
</div>
<div class="sms_foot">
    <img src="../images/images_58.jpg" width="944" height="8" class="float_left" />
</div>


<div class="die">
    <div id="dialog-form"  style=""> 
        <iframe id="idialogView" width="600" height="350" scrolling="auto" frameborder="0" src="../UserControls/Picker.aspx?rolecode={0}&type=privilege"></iframe>
    </div>
    <asp:HiddenField ID="hdRoleCode" runat="server" />
     
</div>
</asp:Content>